package io.github.lee.jel.api

import io.github.lee.jel.domain.Item
import io.github.lee.jel.domain.LoginResponse
import io.github.lee.jel.domain.Page
import io.github.lee.jel.domain.Response
import okhttp3.RequestBody
import retrofit2.http.Body
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.Path

interface UserApi {

    @POST("/Users/AuthenticateByName")
    suspend fun login(@Body body: RequestBody): Response<LoginResponse>

    @GET("/Users/{userId}/Views")
    suspend fun views(@Path("userId") userId: String):
            Response<Page<Item>>
}